<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="sec"%>
<%@ taglib uri="http://www.joda.org/joda/time/tags" prefix="joda"%>
 <table class="table table-striped table-bordered table-condensed">
  <thead>
   <th>合同</th>
   <th>批次</th>
   <th>数量</th>
   <th>缴库</th>
  </thead>
  
  <tbody>
  <c:forEach items="${beans}" var="item">
    <form id="pcform_${item.id}">
    <input type="hidden" name="income.contract.id" value="${item.id}"  />
    <input type="hidden" name="income.owner.code" value="${product.code}"  />
    <tr>
    <td>${item.name}</td>
    <td><input name="income.batchName"   />  </td>    
    <td><input name="income.value" onblur="judgeNumber(this)"   />  </td>    
    <td> 
        <button class="btn btn-inverse" type="button" onclick="doturnin('${item.id}')">
          <i class="icon-white icon-share-alt"></i>
                             缴库</button>
    </td>
    </tr>
    </form>
  </c:forEach>
  
  </tbody>
</table>
<script type="text/javascript">
  function doturnin(id){
	  var data = $("#pcform_"+id).serialize();
	  $.post('contract/contract!turnin',data,function(){
		  
	  });
  }
</script>